import request from '@/utils/request'
export function getApplyInfos(caseId) {
  return request({
    url: '/api/Case/CaseBillApply/GetApplyInfos',
    method: 'get',
    params: { caseId }
  })
}

export function getChargeTypes() {
  return request({
    url: '/api/Case/CaseBillApply/GetChargeTypes',
    method: 'get',
  })
}

export function getCompanies(params) {
  return request({
    url: '/api/Case/CaseBillApply/GetCompanies',
    method: 'get',
    params
  })
}

export function getEmployees(params) {
  return request({
    url: '/api/Case/CaseBillApply/GetEmployees',
    method: 'get',
    params
  })
}

export function addBill(data) {
  return request({
    url: '/api/Case/CaseBillApply/AddBill',
    method: 'post',
    data
  })
}

export function reBill(data) {
  return request({
    url: '/api/Case/CaseBillApply/ReBill',
    method: 'post',
    data
  })
}

export function editBill(data) {
  return request({
    url: '/api/Case/CaseBillApply/EditBill',
    method: 'post',
    data
  })
}

export function refundBill(data) {
  return request({
    url: '/api/Case/CaseBillApply/RefundBill',
    method: 'post',
    data
  })
}

export function deleteBill(id) {
  return request({
    url: '/api/Case/CaseBillApply/DeleteBill',
    method: 'get',
    params: { id }
  })
}

export function addCharge(data) {
  return request({
    url: '/api/Case/CaseBillApply/AddCharge',
    method: 'post',
    data
  })
}

export function editCharge(data) {
  return request({
    url: '/api/Case/CaseBillApply/EditCharge',
    method: 'post',
    data
  })
}

export function deleteCharge(id) {
  return request({
    url: '/api/Case/CaseBillApply/DeleteCharge',
    method: 'get',
    params: { id }
  })
}

// export function addBillReturn (data) {
//   return request({
//     url: '/api/Case/CaseBillApply/AddBillReturn',
//     method: 'post',
//     data
//   })
// }

export function deleteBillReturn(id) {
  return request({
    url: '/api/Case/CaseBillApply/DeleteBillReturn',
    method: 'get',
    params: { id }
  })
}